import java.util.Scanner;

/**
 * Created by rzd on 2017/4/10.
 */
public class Math
{
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        int[] factor = new int[50];// 存放因子的数组
        int i = 0;
        // 从2开始分解出因子
        for (int j = 2; j <= n; j++) {
            factor[i++] = j;
            n -= j;
        }

        if (0 != n) {
            if (n == i + 1) {// 即现在的n比因子数还多一个，不可能均匀分配，所以加在最后先
                factor[i - 1]++;
                n--;
            }
            for (int j = 0; j < n; j++) {// 从后往前依次加1
                factor[i - j - 1]++;
            }
        }
        int max = 1;
        for (int j = 0; j < i; j++) {
            max *= factor[j];
        }
        System.out.println(max);
    }
}

